//
//  FileUploadCell.m
//  MIS Cloud
//
//  Created by goldeney on 14-7-23.
//  Copyright (c) 2014年 goldeneye. All rights reserved.
//

#import "FileUploadCell.h"

@implementation FileUploadCell
@synthesize fileInfo;
@synthesize progress;
@synthesize fileIcon;
@synthesize fileName;
@synthesize fileCurrentSize;
@synthesize fileSize;
@synthesize operateButton;
@synthesize operateIcon;
@synthesize operateText;

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Load the top-level objects from the custom cell XIB.
        NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:@"FileUploadCell" owner:self options:nil];
        // Grab a pointer to the first object (presumably the custom cell, as that's all the XIB should contain).
        self = [topLevelObjects objectAtIndex:0];
        self.opaque = YES;
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        
        [self addNewsView];
    }
    
    return self;
}

- (void)addNewsView
{
    UIImage * backgroundImage = [[UIImage imageNamed:@"progress_gray.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(3, 3, 3, 3)];
    UIImage * foregroundImage = [[UIImage imageNamed:@"progress_green.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(3, 3, 3, 3)];
    self.progress = [[MCProgressBarView alloc] initWithFrame:CGRectMake(70, 32, SuperWidth - 142, 10)
                                             backgroundImage:backgroundImage foregroundImage:foregroundImage];
    self.progress.progress = 0.0;
    [self.contentView addSubview:self.progress];
}

- (void)awakeFromNib
{
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
